package com.workcell.workdata.xthings.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * 设备绑定表
 *
 * @TableName t_device_bind
 */
@ApiModel(value = "deviceBind", description = "设备绑定")
@TableName(value = "t_device_bind")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeviceBind implements Serializable {

    /**
     * 主设备编号
     */
    @NotEmpty(message = "主设备编号不能为空")
    @ApiModelProperty(value = "主设备编号")
    private String masterDeviceNo;

    /**
     * 从设备编号
     */
    @NotEmpty(message = "从设备编号不能为空")
    @ApiModelProperty(value = "从设备编号")
    private String slaveDeviceNo;

    /**
     * 主设备类型
     */
    @NotEmpty(message = "主设备类型不能为空")
    @ApiModelProperty(value = "主设备类型")
    private String masterHardwareType;

    /**
     * 从设备类型
     */
    @NotEmpty(message = "从设备类型不能为空")
    @ApiModelProperty(value = "从设备类型")
    private String slaverHardwareType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
